package com.premjit.examples.classStructure;

import com.premjit.logger.Logger;

public class DerivedRectangle extends BaseClass{
	int sideA;
	int sideB;
	int perimeter;
	
	public DerivedRectangle(int a, int b){
		super();
		this.sideA = a;
		this.sideB = b;
	}
	
	//overriding method
	public void calculatePerimeter(){
		Logger.debug("In DerivedRectangle.calculatePerimeter()");
		perimeter = 2*sideA*sideB;
	}
	
	public int getSideA(){
		return sideA;
	}
	
	public int getSideB(){
		return sideB;
	}
	
	public int getPerimeter(){
		return perimeter;
	}

}
